﻿using Microsoft.Practices.EnterpriseLibrary.Data;
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Text;

namespace H2TWebService
{
    class CustomerParameterMapper : IParameterMapper
    {
        public void AssignParameters(DbCommand command, object[] parameterValues)
        {
            DbParameter parameter = command.CreateParameter();
            parameter.ParameterName = "@username";
            parameter.Value = parameterValues[0];
            command.Parameters.Add(parameter);

            DbParameter parameter2 = command.CreateParameter();
            parameter2.ParameterName = "@password";
            parameter2.Value = parameterValues[1];
            command.Parameters.Add(parameter2);
        }
    }
}
